package com.jsn.hello_cmake;

import java.util.ArrayList;
import java.util.List;

public class algor {

    /*** Definition for a binary tree node.
     */
    public List<Integer> inorderTraversal(TreeNode root) {


        List<Integer> result=new ArrayList<>();

        _inorderTraversal(root,result);
        return result;



    }



    public  void _inorderTraversal(TreeNode node,List<Integer> res){

        if(node==null) return ;

        if(node.left!=null) _inorderTraversal(node.left,res);

        res.add(node.val);

        _inorderTraversal(node.right,res);

    }




    public class TreeNode {
        public int val;
       public TreeNode left;
         public TreeNode right;
          public TreeNode(int x) { val = x; }
      }

      public String fun(String a ){
        String b="";
        a=b;
        return a;
      }

}
